package com.imti.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.imti.dot.ProductDot;
import com.imti.entity.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * (Product)表数据库访问层
 *
 * @author makejava
 * @since 2023-02-03 15:06:05
 */
@Mapper
public interface ProductDao extends BaseMapper<Product> {

    @Select("SELECT pd.product_name,pl.place_name,pd.sale_price FROM product pd,place pl WHERE pd.`place_id`=pl.`place_id`  AND pd.product_name LIKE concat ('%',#{productName},'%')")
    public List<ProductDot> FindProductInfoByName(String productName);

}

